import time
import random
import threading as thread


def work(id, n):
    for i in range(n):
        print('#%s: %s' % (id, i))
        interval= random.randint(0, 20) / 10
        time.sleep(interval)


t1 = thread.Thread(target=work, kwargs={'id': 1, 'n': 10})
t2 = thread.Thread(target=work, args=(2, 10))
t1.start()
t2.start()
t1.join()
t2.join()
